<%--
  Copyright &copy; Well All rights reserved.
  User: Well
  Date:2018-04-11
  Description:easyui的combobox控件
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<h2>普通下拉框</h2>
<input class="easyui-combobox" />

<br/>
<br/>

<h2>字典下拉框</h2>
<input id="dictionary" class="easyui-dictionarybox" data-options="type:1,method:'get'" />
<xmp><input class="easyui-dictionarybox" data-options="type:1,method:'get'" /></xmp>
<a href="javascript:getDictionaryData();" class="easyui-linkbutton">获取字典</a>
<a href="javascript:setDictionaryData();" class="easyui-linkbutton">设置字典</a>
<br/>
<br/>

<h2>性别下拉框</h2>
<input id="gender" class="easyui-genderbox" />
<xmp><input class="easyui-genderbox" /></xmp>
<a href="javascript:getGenderValue();" class="easyui-linkbutton">获取性别</a>
<a href="javascript:setGenderValue();" class="easyui-linkbutton">设置性别</a>
<br/>
<br/>

<h2>启用下拉框</h2>
<input class="easyui-enablebox" />
<xmp><input class="easyui-enablebox" /></xmp>

<script type="text/javascript">

  function getDictionaryData(){
    var data=$("#dictionary").dictionarybox("getData");
    console.log(data);
  }

  function setDictionaryData(){
    $("#dictionary").dictionarybox("setValue","未知");
  }

  function  getGenderValue(){
    var value=$("#gender").genderbox("getValue");
    console.log(value);
  }

  function setGenderValue(){
    $("#gender").genderbox("setValue","未知");
  }

</script>
